<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <h:body>
        <ui:composition template="./template.xhtml">
            <ui:define name="title">
                Customer Management
            </ui:define>
            <ui:define name="content">
                <h2>Customer Management</h2>
                <div>
                    <h:form>
                        <h:dataTable border="1" id="customers" value="#{listCustomerView.customerList}" var="customer">
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Name" />
                                </f:facet>
                                <h:commandLink action="#{listCustomerView.editCustomer}">
                                    <f:param name="id" value="#{customer.id}"/>
                                    <h:outputText value="#{customer.name}" />
                                </h:commandLink>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Address" />
                                </f:facet>
                                <h:outputText value="#{customer.address}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Contact" />
                                </f:facet>
                                <h:outputText value="#{customer.contactName}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Telephone" />
                                </f:facet>
                                <h:outputText value="#{customer.telephone}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Fax" />
                                </f:facet>
                                <h:outputText value="#{customer.fax}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Mobile" />
                                </f:facet>
                                <h:outputText value="#{customer.mobile}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Email" />
                                </f:facet>
                                <h:outputText value="#{customer.email}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Note" />
                                </f:facet>
                                <h:outputText value="#{customer.note}" />
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>